﻿/*
* 创建者：LIYINFAI
* 创建时间：2023/10/24 9:35:26
* 描述：
* --------------------------------------
* 修改说明：
* --------------------------------------
*/
using CommonLibrary.Forms;
using System.Windows.Forms;

namespace CommonLibrary
{
    /// <summary>
    /// 消息弹窗
    /// </summary>
    public class HWMessageBox
    {
        /// <summary>
        /// 普通消息弹窗
        /// </summary>
        /// <param name="owner"></param>
        /// <param name="message"></param>
        /// <param name="title"></param>
        public static void Show(IWin32Window owner,
            string message,
            string title = "提示")
        {
            HWFrmDialog dialog = new HWFrmDialog();
            dialog.TopMost = true;
            dialog.IsShowMaskDialog = true;
            dialog.Title = title;
            dialog.Content = message;
            dialog.ShowDialog(owner);
        }
        /// <summary>
        /// 确认与取消弹窗
        /// </summary>
        /// <param name="owner"></param>
        /// <param name="message"></param>
        /// <param name="title"></param>
        /// <returns></returns>
        public static DialogResult ShowYesNo(IWin32Window owner,
            string message,
            string title = "提示")
        {
            HWFrmYesNoDialog dialog = new HWFrmYesNoDialog();
            dialog.IsShowMaskDialog = true;
            dialog.Title = title;
            dialog.Content = message;
            return dialog.ShowDialog(owner);
        }
    }

}
